<!--# layout("/common/leftmallout.html",{"jsBase":"/js/user/subMerchant/"}){ -->
<link rel="stylesheet" href="http://ziyunoss.oss-cn-hangzhou.aliyuncs.com/pop/mall/style/member.css">

          <!-------------面包屑--------------------->
           <div class="center">
            <div class="bread-crumbs">
                   <br/>
                </div>
        <!------------------主体结构--------------------->
              
        <div class="sub_info">
            <!-- 左侧 -->
            <div class="small-page">

            </div>
            <!-- 右侧 -->
            <div class="info_right">
                <!-- 头部 -->
                <div class="info_head">
                    <span>设置子公司信息</span>
                </div>
                <div class="personal_info">
                    <p>
                        <label for=""><font color="red">*</font>联系人名称：</label>
                        <span class="sp">
                            <input class="contacts_name" type="text">
                        </span>
                    </p>
                    <p>
                        <label for=""><font color="red">*</font>智能验证：</label>                     
                           
                           
                           <span class="sp">
                            <span id="sc1"></span>
                        </span>
                           
                   
                    </p>
                    <p>
                        <label for=""><font color="red">*</font>手机号码：</label>
                        <span class="sp">
                            <input class="phone_input" type="text">
                        </span>
                    </p>
                    <p>
                        <label for=""><font color="red">*</font>短信验证码：</label>
                        <span class="sp">
                            <input class="code_input"  type="text">
                        </span>
                        <a class="huoqu_vcode" href="javacript:void(0);">点击获取验证码</a>
                    </p>
                    <p>
                        <label for="">座机号码：</label>
                        <span class="sp">
                            <input class="fixedPhone_input"  type="text">
                        </span>
                    </p>
                    <p>
                        <label for="">qq号：</label>
                        <span class="sp">
                            <input class="qq"  type="text">
                        </span>
                    </p>
                    <p>
                        <label for=""><font color="red">*</font>邮箱：</label>
                        <span class="sp">
                            <input class="email" type="text">
                        </span>
                    </p>
                    <p>
                        <label for=""><font color="red">*</font>门头照名称：</label>
                        <span class="sp">
                            <input class="doorheadNname" type="text">
                        </span>
                    </p>
                    <p>
                        <label for=""><font color="red">*</font>子公司名称：</label>
                        <span class="sp">
                            <input class="sub_sellerName" type="text" placeholder="子公司名称不能和公司名称一样">
                        </span>
                    </p>
                    <p>
                        <label for=""><font color="red">*</font>子公司地址：</label>
                       <!--  <span class="sp">
                            <input class="area_input" type="text">
                        </span> -->
                        <input type="hidden" id="areaId" value="">				    
				        <span>
				       		<select class="add_select_site" ></select>
				            <select class="add_select_site" ></select>
				            <select class="add_select_site" ></select>
				        </span>
                    </p>
                    <p>
                        <label for=""><font color="red">*</font>详细地址：</label>
                        <span class="sp">
                            <input class="addr_input" type="text">
                        </span>
                    </p>
                    <p>
                        <label for=""><font color="red">*</font>店面门头照：</label>
                        <span class="facade sellerImage_span" >
                            <input type="file" class="sellerfile_input" id="sellerImage_input" placeholder="点击上传">                        
                        </span>
                        <label for=""><font color="red">*</font>营业执照：</label>
                        <span class="facade" id="business_Url">
                        
                        </span>
                       
                    </p>
                    
                    <p>
                        <label for=""><font color="red">*</font>所属类型：</label>
                        <!-- <input type="hidden" id="seller_type" type="text"> -->
                        <span  class="sp">
                            <input class="type_input" type="text"/>
                        </span>
                    </p>
                    <p>
                        <label for=""><font color="red">*</font>月交易规模：</label>
                        <span class="sp">
                            <input class="monthlyTradingScale" type="text">
                        </span>
                    </p>
                    <button class="confirm submit_button">提交</button>

                </div>
            </div>
        </div>
    </div>
                
        
            
              
					
                        
                                     
<!-- 阿里云智能验证 -->
<script src="//g.alicdn.com/sd/smartCaptcha/0.0.3/index.js"></script>
 <script>
    window.NVC_Opt = {
        appkey:'FFFF00000000017E28ED',
        scene:'ic_register',
        renderTo:'#captcha',
        trans: {"key1": "code0", "nvcCode":200},
        elements: [
            '//img.alicdn.com/tfs/TB17cwllsLJ8KJjy0FnXXcFDpXa-50-74.png',
            '//img.alicdn.com/tfs/TB17cwllsLJ8KJjy0FnXXcFDpXa-50-74.png'
        ], 
        bg_back_prepared: '//img.alicdn.com/tps/TB1skE5SFXXXXb3XXXXXXXXXXXX-100-80.png',
        bg_front: '',
        obj_ok: '//img.alicdn.com/tfs/TB1rmyTltfJ8KJjy0FeXXXKEXXa-50-74.png',
        bg_back_pass: '//img.alicdn.com/tfs/TB1KDxCSVXXXXasXFXXXXXXXXXX-100-80.png',
        obj_error: '//img.alicdn.com/tfs/TB1q9yTltfJ8KJjy0FeXXXKEXXa-50-74.png',
        bg_back_fail: '//img.alicdn.com/tfs/TB1w2oOSFXXXXb4XpXXXXXXXXXX-100-80.png',
        upLang:{"cn":{
            _ggk_guide: "请摁住鼠标左键，刮出两面盾牌",
            _ggk_success: "恭喜您成功刮出盾牌<br/>继续下一步操作吧",
            _ggk_loading: "加载中",
            _ggk_fail: ['呀，盾牌不见了<br/>请', "javascript:noCaptcha.reset()", '再来一次', '或', "http://survey.taobao.com/survey/QgzQDdDd?token=%TOKEN", '反馈问题'],
            _ggk_action_timeout: ['我等得太久啦<br/>请', "javascript:noCaptcha.reset()", '再来一次', '或', "http://survey.taobao.com/survey/QgzQDdDd?token=%TOKEN", '反馈问题'],
            _ggk_net_err: ['网络实在不给力<br/>请', "javascript:noCaptcha.reset()", '再来一次', '或', "http://survey.taobao.com/survey/QgzQDdDd?token=%TOKEN", '反馈问题'],
            _ggk_too_fast: ['您刮得太快啦<br/>请', "javascript:noCaptcha.reset()", '再来一次', '或', "http://survey.taobao.com/survey/QgzQDdDd?token=%TOKEN", '反馈问题']
            }
        }
    }
  </script>

  <script src="//g.alicdn.com/sd/nvc/1.1.112/guide.js"></script>
  <script>
    aliVerifyStatus=false;
    window.onload = function(){
      window.ic = new smartCaptcha({
        renderTo: '#sc1',
        width: 300,
        height: 42,
        default_txt: '点击按钮开始智能验证',
        success_txt: '验证成功',
        fail_txt: '验证失败，请在此点击按钮刷新',
        scaning_txt: '智能检测中',
        success: function(data) {
          console.log(NVC_Opt.token)
          console.log(data.sessionId);
          console.log(data.sig);
          aliSessionId=data.sessionId;
          aliToken=NVC_Opt.token;
          aliSig=data.sig;
          aliScene=NVC_Opt.scene;
          aliVerifyStatus=true;
        },
      });
      ic.init();
      try {
          if(typeof captchaInit === "function") { //是函数
              captchaInit();
          } else { //不是函数

          }
      } catch(e) {}
    }

  </script>
<!-- end 阿里云智能验证-->

      
<!--#} --> 
       
 <script>
layui.use(['addSubMerchant'], function(){
    var popAddSubMerchantIndex = layui.addSubMerchant
    popAddSubMerchantIndex.init();
});


</script>
<script src="http://www.11ziyun.com/js/region.js"></script>
<script src="http://pv.sohu.com/cityjson?ie=utf-8"></script> 
<script >

	
	doAjax('/user/subMerchant/showMainMerchantInfo.json','get','',function(res){
		
		
		$('.contacts_name').val(res.data.name);
		$('.phone_input').val(res.data.sellerMobile);
		$('.fixedPhone_input').val(res.data.sellerTel);
		$('.qq').val(res.data.sellerQq);
		$('.email').val(res.data.sellerEmail);	
		$('.monthlyTradingScale').val(res.data.monthlyTradingScale);
		if(res.data.businessUrl == null || res.data.businessUrl == ""){
			$('#business_Url').html('<image id="busi_img" src="https://ziyunoss.oss-cn-hangzhou.aliyuncs.com/pop/mall/image/pic_pop_01.png"></image>');//营业执照
		}else{
			$('#business_Url').html('<image id="busi_img" data-item="'+res.data.businessUrl+'" src="https://ziyunoss.oss-cn-hangzhou.aliyuncs.com/'+res.data.businessUrl+'"></image>');//营业执照
		}
		
		$('.doorheadNname').val(res.data.sellerName);
		$('#areaId').val(res.data.areaId);
		
		//商户类型
		$('#seller_type').val(res.data.sellerType);
       	if(res.data.sellerType == 0){
       		res.data.sellerType = '供应商';
       	}else if(res.data.sellerType == 1){
       		res.data.sellerType = '工厂';
       	}
       	$('.type_input').val(res.data.sellerType);
       	
       	
       	var areaid=$('#areaId').val();
       	if(areaid > 0){
       		$.select_add("add_select_site", region_Data, areaid);
       	}else{
       		$.select_add("add_select_site", region_Data, 3);//默认北京/北京市/东城区
       	}
		
		
		
		

	},'');
	




	var html=$('.page-aside');
	var righthtml=$('.page-article');
	$('.small-page').empty();
	$('.small-page').append(html);
	$('.small-page').append(righthtml);

	$('#subMerchant').css({'color':'#6647b2','font-weight':'900'});
</script>
    
<style>
* {
    margin: 0;
    padding: 0;
}
.message {
    width: 100%;
    height: 15000px;
    background:#fff;
}
.sub_info {
    width: 1200px;
    height: 1500px;
    margin: auto;
}
.info_left {
    width: 200px;
    height: 1500px;
    float: left;
}
.info_right {
    width: 970px;
    height: 1500px;
    float: right;
}
.info_head {
    width: 970px;
    height: 60px;
    padding: 10px 40px;
    box-sizing: border-box;
    background-color: #f4f4f4;
}
.info_head span {
    line-height: 40px;
    color: #000;
    font-weight: bold;
    font-size: 24px;
}
.personal_info {
    width: 970px;
    height: 1440px;
    padding: 10px 40px;
    box-sizing: border-box;
}
.personal_info p {
    margin-bottom: 30px;
}
.personal_info p label {
    display: inline-block;
    width: 100px;
    text-align: right;
}
.personal_info p .sp {
    display: inline-block;
    width: 300px;
    height: 42px;
} 
.personal_info p span input {
    width: 300px;
    height: 42px;
    padding-left: 20px;
    box-sizing: border-box;
    outline: none;
    border:1px solid #ccc;
}
.personal_info p .facade {
	display:inline-block;
    width: 100px;
    height: 100px;
    background-color: #ccc;
    vertical-align: top;
}
.personal_info p .facade input {
    width: 70px;
    height: 25px;
    padding-left: 0;
    font-size: 12px;
    text-align: center;
    margin-top: 70px;
    margin-left: 16px;
}
.huoqu_vcode {
	padding: 10px;
    width: 100px;
    height: 42px;
    background-color: #6647b3;
    color: #fff;
    
}
.confirm {
    margin-left: 100px;
    width: 300px;
    height: 42px;
    background-color: #6647b3;
    color: #fff;
    font-size: 24px;
}
.up_img{
	width: 100px;
	 height: 100px;
    display: inline-block;
}
.img_obj{
	width: 100px;
	height: 100px;
}
.add_select_site {
	width: 98px;
    height: 26px;
    border:1px solid #ccc;
    padding-left: 20px;
}
.img_del {
	width:60px;
	display:block;
	height:20px;
	line-height:20px;
	text-align:center;
	background:red;
	color:white;
	font-size:13px;
	font-weight:900;
	margin-left: 22px;
	margin-top: 3px;
}
#busi_img{
    width: 100px;
    height:100px;
}
</style>
